package com.example.shoppingmall.dao;

import com.example.shoppingmall.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdvertisingMapper {
    //广告列表：分页显示+条件查询
    public List<Advertising> getAdvertisingAll(@Param("Advertisementname") String Advertisementname,
                                               @Param("utime") String utime,@Param("pageno") Integer pageno,
                                               @Param("pageSize") Integer pageSize);

    //查询总条数
    public int advertisingcount(@Param("Advertisementname") String Advertisementname, @Param("utime") String utime);

    //新增广告
    public int addAdvertising(Advertising advertising);

    //编辑广告
    public int updAdvertising(Advertising advertising);

    //查询广告详情
    public Advertising selAdvertising(Integer id);

    //删除广告
    public int delAdvertising(Integer id);

    //查询所有广告类型
    public List<Advertisingtype> getAdvertisingtype();

    //查询所有所属广告位
    public List<Advertisingspace> getAdvertisingspace();

    //查询所有商品
    public List<Commodity> getCommoditylist();

    //查询所有文章
    public List<Articlelist> getArticlelistall();

    //查询所有文章分类
    public List<Article> getArticletypes();
}
